checkAllFields Method |
This method validates all the fields in the page and returns a Boolean value indicating whether all the fields are validated or not.
Syntax
bSuccess = validateID.checkAllFields()
Return Value
Returns a boolean value indicating whether all the fields in the page are validated or not.
Remarks
This method is particularly useful in conjunction when thevalidationLevelproperty is set to "form". Once all the data is entered in the page and the page is ready for a validation check, this method can be called to know whether the entries in the page are correct or not. Based on the entry, the navigation can be kept focused in the window itself until all entries are validated and are found to be correct.
Example
The following example shows how checkAllFields method is used.
//This element is a required one, but its validation can be done at form level <input id="myPassword" fieldType="text" minValue=8 validationLevel="form" required> //Method is called during the submit of the form. "validater" is the ID of the validate component //For example, the method can be called on onbeforeapplicationclose event if (validater.checkAllFields() == false) event.returnValue = false;